package com.zxt.dental_sys.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 
 * @TableName anxiety_info
 */
@TableName(value ="anxiety_info")
@Data
public class AnxietyInfo implements Serializable {
    /**
     * 焦虑评估id
     */
    @TableId
    private String anxietyId;

    /**
     * 病人id
     */
    private String patientId;

    /**
     * 评分
     */
    private Integer scores;

    /**
     * 麻醉方案
局部麻醉
镇静麻醉
静脉镇静
全身麻醉
     */
    private String aneshesiaPlan;

    /**
     * 医生确认状态
     */
    private Integer doctorConfirms;

    /**
     * 插入时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
    private Date inputTime;

    /**
     * 是否删除
     */
    private Integer isDeleted;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        AnxietyInfo other = (AnxietyInfo) that;
        return (this.getAnxietyId() == null ? other.getAnxietyId() == null : this.getAnxietyId().equals(other.getAnxietyId()))
            && (this.getPatientId() == null ? other.getPatientId() == null : this.getPatientId().equals(other.getPatientId()))
            && (this.getScores() == null ? other.getScores() == null : this.getScores().equals(other.getScores()))
            && (this.getAneshesiaPlan() == null ? other.getAneshesiaPlan() == null : this.getAneshesiaPlan().equals(other.getAneshesiaPlan()))
            && (this.getDoctorConfirms() == null ? other.getDoctorConfirms() == null : this.getDoctorConfirms().equals(other.getDoctorConfirms()))
            && (this.getInputTime() == null ? other.getInputTime() == null : this.getInputTime().equals(other.getInputTime()))
            && (this.getIsDeleted() == null ? other.getIsDeleted() == null : this.getIsDeleted().equals(other.getIsDeleted()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getAnxietyId() == null) ? 0 : getAnxietyId().hashCode());
        result = prime * result + ((getPatientId() == null) ? 0 : getPatientId().hashCode());
        result = prime * result + ((getScores() == null) ? 0 : getScores().hashCode());
        result = prime * result + ((getAneshesiaPlan() == null) ? 0 : getAneshesiaPlan().hashCode());
        result = prime * result + ((getDoctorConfirms() == null) ? 0 : getDoctorConfirms().hashCode());
        result = prime * result + ((getInputTime() == null) ? 0 : getInputTime().hashCode());
        result = prime * result + ((getIsDeleted() == null) ? 0 : getIsDeleted().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", anxietyId=").append(anxietyId);
        sb.append(", patientId=").append(patientId);
        sb.append(", scores=").append(scores);
        sb.append(", aneshesiaPlan=").append(aneshesiaPlan);
        sb.append(", doctorConfirms=").append(doctorConfirms);
        sb.append(", inputTime=").append(inputTime);
        sb.append(", isDeleted=").append(isDeleted);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}